package com.michael.service;


import com.michael.dao.TOrder;
import com.michael.dao.TOrderDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TOrderService {

    @Autowired
    private TOrderDao tOrderDao;

    public TOrder save(Integer b, String v){
        TOrder tOrder = new TOrder();
        tOrder.setUserId(b);
        tOrder.setUserName(v);
        tOrderDao.save(tOrder);
        return tOrder;
    }

    public TOrder get(Long orderId){
        return tOrderDao.find(orderId);
    }

}
